import request from '@/utils/request'
import axios from 'axios'

export function getToken () {
  const url = '/File/qiniuToken'
  return request.post(url)
  // return request({ url, method: 'post', baseURL: '' })
}
export function qidata (data) {
  const formData = new FormData()
  Object.keys(data).forEach(key => {
    formData.append(key, data[key])
    // formData.set(key, data[key])
  })
  return Request.post('http://upload.qiniup.com', formData)
  // return request({ url, method: 'post', baseURL: 'http://upload.qiniup.com', data: data })
}
const Request = axios.create({
  timeout: 1000 * 10
})
// console.log(Request)
